<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>累计疫情热力图加地图</title>
    <script src="../static/echarts.min.js"></script>
    <script src="../static/china.js"></script>
</head>
<body>
<div id="main" style="width:600px;height:500px"></div>
<script type="text/javascript">
      // 基于准备好的dom，初始化echarts实例
      var myChart = echarts.init(document.getElementById('main'));

      option = {
      title: {
        text: '累计疫情热力图加地图',
        subtext: '地图加热力图',
        left: 'center'
      },
      tooltip: {
        trigger: 'item'
      },
      legend: {
        orient: 'vertical',
        left: 'left'
      },
      visualMap: {
        min: 0,
        max: 5000,
        calculable: true,
        orient: 'vertical',
        bottom: '0%'
      },
       series:[
         {
            name:'中国',
            type:'map',
            mapType:'china',
            label:{
               emphasis:{
                  show:true
               },
               normal:{
                  show:true
               }
            },
            data: [
                   {% for data in datas %}
                   {value:{{ datas[data] }}, name: '{{data}}'},
                   {% endfor %}
            ]
          }
       ]
    };

      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(option);


</script>

</body>
</html>